home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / sdk / vfw11.win / vfwdk / common.c_ / common.bin
Encoding:
Text File  |  1993-11-19  |  1.6 KB  |  59 lines

  1. /**************************************************************************
  2.  *
  3.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6.  *  PURPOSE.
  7.  *
  8.  *  Copyright (c) 1992, 1993  Microsoft Corporation.  All Rights Reserved.
  9.  * 
  10.  *  COMMON.C
  11.  *
  12.  *  Description:
  13.  *      Common functions useful for Windows programs.
  14.  *
  15.  *  Notes:
  16.  *      This module is NOT to be declared unicode!
  17.  *
  18.  **************************************************************************/
  19.  
  20. #include <windows.h>
  21. #include <windowsx.h>
  22. #include "appport.h"
  23. #include "vcr.h"
  24. #include "viscadef.h"
  25. #include "mcivisca.h"
  26. #include "viscamsg.h"
  27. #include "common.h"
  28.  
  29. #ifdef DEBUG
  30. char    ach[300];        // debug output (avoid stack overflow)
  31.                         // each attaching process should have own
  32.                         // version of this.
  33.  
  34. void NEAR PASCAL
  35. DebugPrintf(int iDebugMask, LPSTR szFormat, LPSTR szArg1)
  36. {
  37.     // Errors always get printer, iDebugMask == 0
  38.     if(!(iDebugMask & pvcr->iGlobalDebugMask) && (iDebugMask))
  39.         return;
  40.  
  41.     wvsprintf(ach, szFormat, szArg1);
  42.  
  43.     if(!iDebugMask)
  44.         OutputDebugString("Error: ");
  45.  
  46.     /* output the debug string */
  47.     OutputDebugString(ach);
  48. }
  49.  
  50. void FAR _cdecl _DPF1(iDebugMask, szFormat, iArg1, ...)
  51. int     iDebugMask;
  52. LPSTR    szFormat;    // debug output format string
  53. int        iArg1;        // placeholder for first argument
  54. {
  55.     DebugPrintf(iDebugMask, szFormat, (LPSTR) &iArg1);
  56. }
  57. #endif
  58.  
  59.